package com.wd.mylibrary_near.viewmodel

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope

import com.wd.mylibrary_base.bean.NearBean
import com.wd.mylibrary_base.utils.HttpUtils
import kotlinx.coroutines.launch


/**
 * 作者： 袁春杰
 * 日期： 2024/9/17 20:41
 * 功能：
 */
class NearViewModel:ViewModel() {
    var nearby= MutableLiveData<NearBean>()


     fun getNearby(userId:Int,liveType:Int,page:Int,size:Int){
         viewModelScope.launch {
          nearby.value= HttpUtils.httpUtils.apiService.getNearby(userId,liveType,page,size)
        }

    }

}





















